import { useState } from "react";


const Item = () => <div>我是item元素</div>;
const App = () => {
  const [count, setCount] = useState(0);
  const ele = <p>p元素</p>;
  return (
    <div>
      {count === 1 ? ele : ""}
      <Item></Item>
      <h1
        onClick={() => {
          setCount(count + 1);
        }}
      >
        click
      </h1>
    </div>
  );
};

// const App = () => {
//   return (
//     <div>
//       <Child />
//       <div>111</div>
//     </div>
//   );
// };

// const Child = () => {
//   return <h1>text</h1>;
// };

export default App;
